import Register from '@/pages/Register.vue';
import Login from '@/pages/Login.vue';
import NotFound from '@/pages/NotFound.vue';
const routes = [
    {
        path:'/register',
        name:'register',
        component:Register
    },
    {
        path:'/login',
        name:'login',
        component:Login,
    },
    {
        path:'/home',
        name:'home',
        component:()=>import('@/pages/Home.vue'),
        children:[
            {
                path:'student',
                name:'student',
                component:()=>import('@/pages/home/Student.vue'),
                children:[
                    {
                        path:'stusearch',
                        name:'stusearch',
                        component:()=>import('@/pages/home/student/StuSearch.vue')
                    },
                    {
                        path:'stuentry',
                        name:'stuentry',
                        component:()=>import('@/pages/home/student/StuEntry.vue')
                    }
                ]
            },
            {
                path:'score',
                name:'score',
                component:()=>import('@/pages/home/Score.vue')
            }
        ]
    },
    {
        path:'/',
        redirect: {
            name:'home'
        }
    },
    {
        path:'*',
        name:'notfound',
        component:NotFound
    }
];
export default routes